#ifndef __MUSICSELECT_SCENE_H__
#define __MUSICSELECT_SCENE_H__

#include "cocos2d.h"
#include "WStringSupport.h"
#include "Audio.h"
#include "debug.h"
#include "UI.h"
#include "MusicListManager.h"
#include "UIMusicList.h"
#include "UIMusicSelect.h"
#include "UIMusicSelectConsoleComponent.h"
#include "UIMusicInfoPanel.h"

USING_NS_CC;

class SceneMusicSelect : public cocos2d::Layer
{
	public:
	Size listItemSize = Size(frameSize.width / 4, 45);
	Size listArea;
	Size levelListArea;

	private:
	MusicSelectUITitle* topbar;
	MusicListManager listmgr;
	MusicLevelListManager levelmgr;
	MusicList* mlist;
	MusicLevelList* mlevellist;
	MusicSelectCover* mscover;
	ClippingNode* levelListClip;
	UIMusicInfoPanel* msinfopanel;
	MusicSelectInfo* mapinfo;
	MusicSelectConsole* msconsole;
	ParticleSystemQuad* pPSEmitter;

	public:
	static cocos2d::Scene* createScene();

	virtual bool init();

	//Scene scheme
	void createBG();
	void createUI();
	void createList();
	void createConsolePanel();
	void createInfoPanel();
	void playBGM();

	//Music Select Function
	void changeMusicSelect();
	//void loadMusicLevel();

	//implement the "static create()" method manually
	CREATE_FUNC(SceneMusicSelect);

	void sceneFadeInEffect();
	void update(float dt) override;

	void openSetting();


	//Scene Switch Action
	void gotoSoloScene();
	void backtoMainmenu();

	//debug
	void debugMsg();
};

#endif